// ==UserScript==
// @name         Video fullscreen helper
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  fix the bug of volumn manager (a chrome extension)  for fullscreen don't show flags.
// @author       You
// @match        https://www.bilibili.com/video/*/
// @match        https://bde4.com/play/*
// @match        https://v.youku.com/*
// @match        https://v.qq.com/*
// @match        https://movie.douban.com/trailer*
// @match        https://www.iqiyi.com/*
// @match        http://www.iqiyi.com/*
// @match        http://sports.pptv.com/*
// @grant        none
// @require      https://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...

    var id = setInterval(moveVolumnDivToVideoParent, 2000);
    var count = 0;


    function moveVolumnDivToVideoParent() {
        if ($("#VadagonVolumeStatus").length > 0) {
            $("video").parent().append($("#VadagonVolumeStatus"));
            console.log("moveVolumnDivToVideoParent")
            clearInterval(id);
        }
        count++;

        if (count > 10) clearInterval(id);
    }

    //setTimeout("moveVolumnDivToVideoParent()", 2000 );
    //setTimeout(function(){moveVolumnDivToVideoParent();}, 2000 );


})();